﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GmFamilyService.h"
#include "IParameterOverride.h"
#include "UniIdentity.h"

namespace gfam
{
    /// \brief 针对单个参数进行行为覆盖的接口类
    class GM_FAMILY_SERVICE_EXPORT IFamilyParameterCustomizedOverride : public gcmp::IParameterOverride
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyParameterCustomizedOverride, gcmp::IParameterOverride)
    public:

        static gcmp::OwnerPtr<IFamilyParameterCustomizedOverride> Create(gcmp::UniIdentity parameterUid,
            bool ShouldOverrideIsModifiable,
            bool IsModifiable,
            bool ShouldOverrideIsUserVisible,
            bool IsUserVisible);

        /// \brief 设置是否使用IsModifiable()进行覆盖
        /// \param value true覆盖 false 不覆盖
        virtual void SetShouldOverrideIsModifiable(bool value) = 0;

        /// \brief 设置该参数是否可修改
        ///
        /// 被调用前置条件：ShouldOverrideIsModifiable()返回true
        /// \param value true可修改 false 不可修改
        virtual void SetIsModifiable(bool value) = 0;

        /// \brief 设置是否使用IsUserVisible()进行覆盖
        /// \param value true覆盖 false 不覆盖
        virtual void SetShouldOverrideIsUserVisible(bool value) = 0;

        /// \brief 设置该参数用户是否可见
        ///
        /// 被调用前置条件：ShouldOverrideIsUserVisible()返回true
        /// \param value true可见 false 不可见
        /// \see ShouldOverrideIsUserVisible()
        virtual void SetIsUserVisible(bool value) = 0;
    };
}